# Maintainer:
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: suasageandeggs <s_stoakley@hotmail.co.uk>
# Contributor: Michael Fellinger <manveru@www.weez-int.com>

pkgname=libtommath
pkgver=1.2.1
pkgrel=1
pkgdesc='Highly optimized and portable routines for integer based number theoretic applications'
url='http://www.libtom.net/'
license=(custom)
arch=(loong64 x86_64)
depends=(glibc)
source=(https://github.com/libtom/libtommath/releases/download/v$pkgver/ltm-$pkgver.tar.xz)
sha256sums=('986025d7b374276fee2e30e99f3649e4ac0db8a02257a37ee10eae72abed0d1f')

build() {
  cd $pkgname-$pkgver

  make -f makefile.shared IGNORE_SPEED=1
}

package() {
  cd $pkgname-$pkgver

  make -f makefile.shared PREFIX=/usr DESTDIR="$pkgdir" INSTALL_GROUP=root install
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
